package com.jsj.mapper;

import com.jsj.pojo.Device;
import com.jsj.pojo.Type;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DeviceMapper {

    List<Type> queryAllType();
    List<Type> queryType(String type);
    List<Device> queryListByType(String type);
    Boolean addType(Type type);
    Boolean delTypeById(int id);
    Boolean updateById(Type type);


    List<Device> queryDeviceByName(String type, String deviceName);
    Boolean addDeviceByType(Device device);
    Boolean delDeviceById(int deviceId);
    Boolean updateDeviceById(Device device);
    Device queryByDeviceId(int deviceId);

    Boolean updateDeviceStatus(@Param("deviceId") int deviceId, @Param("deviceStatus") String deviceStatus);


}
